package operation;

import book.Book;
import book.BookList;

public class FindOperation implements IOperation{
    public void work(BookList booklist){
        System.out.println("查找图书");
        String name = scanner.nextLine();
        int size = booklist.getUsedSize();
        for(int i = 0; i < size; i++){
            Book book = booklist.getPos(i);
            if(name.equals(book.getName())){
                System.out.println("找到这个本书，信息如下");
                System.out.println(book);
                return;
            }
        }
        System.out.println("没有找到");
    }
}
